using System;
using System.Collections;
using System.Data;
using DotNetNuke.Framework;


namespace BuyRequest
{
    public class tm_buy_requestController : DotNetNuke.Entities.Modules.ISearchable, DotNetNuke.Entities.Modules.IPortable
    {
        #region "Public Methods"
        public tm_buy_requestInfo Get(int requestId)
        {
            return (tm_buy_requestInfo)DotNetNuke.Common.Utilities.CBO.FillObject(DataProvider.Instance().Gettm_buy_request(requestId), typeof(tm_buy_requestInfo));
        }

        public ArrayList List()
        {
            return DotNetNuke.Common.Utilities.CBO.FillCollection(DataProvider.Instance().Listtm_buy_request(), typeof(tm_buy_requestInfo));
        }


        public int Add(tm_buy_requestInfo objtm_buy_request)
        {
            return (int)DataProvider.Instance().Addtm_buy_request(objtm_buy_request.productCode, objtm_buy_request.productType, objtm_buy_request.name1, objtm_buy_request.name2, objtm_buy_request.description, objtm_buy_request.productYear, objtm_buy_request.keywords, objtm_buy_request.standardLevel, objtm_buy_request.transferMethod, objtm_buy_request.otherInfo, objtm_buy_request.processNotes, objtm_buy_request.registerBy, objtm_buy_request.editBy, objtm_buy_request.registerDate, objtm_buy_request.expireDate, objtm_buy_request.lastVerifyDate, objtm_buy_request.lastModifyDate, objtm_buy_request.status);
        }

        public void Update(tm_buy_requestInfo objtm_buy_request)
        {
            DataProvider.Instance().Updatetm_buy_request(objtm_buy_request.requestId, objtm_buy_request.productCode, objtm_buy_request.productType, objtm_buy_request.name1, objtm_buy_request.name2, objtm_buy_request.description, objtm_buy_request.productYear, objtm_buy_request.keywords, objtm_buy_request.standardLevel, objtm_buy_request.transferMethod, objtm_buy_request.otherInfo, objtm_buy_request.processNotes, objtm_buy_request.registerBy, objtm_buy_request.editBy, objtm_buy_request.registerDate, objtm_buy_request.expireDate, objtm_buy_request.lastVerifyDate, objtm_buy_request.lastModifyDate, objtm_buy_request.status);
        }

        public void Delete(int requestId)
        {
            DataProvider.Instance().Deletetm_buy_request(requestId);
        }
        #endregion

        #region "Optional Interfaces"
        public DotNetNuke.Services.Search.SearchItemInfoCollection GetSearchItems(DotNetNuke.Entities.Modules.ModuleInfo ModInfo)
        {
            return null;
        }

        public string ExportModule(int ModuleID)
        {
            return "";
        }

        public void ImportModule(int ModuleID, string Content, string Version, int UserId)
        {
        }
        #endregion
    }
}
